package 笔试;

import java.util.Scanner;

public class 中通 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        改变几个之值使任意相邻的两个数相乘是偶数(sc);

    }

    private static void 改变几个之值使任意相邻的两个数相乘是偶数(Scanner sc) {
        int max = 0;
        int a=0;
        for (int i = 0; i < sc.nextInt(); i++) {
            if((sc.nextInt()&1)==1){
                a++;
            }else{
                max+=(a>>1);
                a=0;
            }
        }
        max+=(a>>1);
        System.out.println(max);
    }

    private static void a0001(Scanner sc) {
        String s = sc.nextLine();
        StringBuilder b = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c<='Z'){
                if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U'){
                    c+=('a'-'A');
                    b.append(c);
                }else b.append(c);
            }else {
                if(c!='a'&&c!='e'&&c!='i'&&c!='o'&&c!='u'){
                    c+=('A'-'a');
                    b.append(c);
                }else b.append(c);
            }
        }
        System.out.print(b);
    }
}
